Fix template tab in github connect UI
All checks were successful
Lint / lint (20.x) (pull_request) Successful in 4m35s
All checks were successful
Lint / lint (20.x) (pull_request) Successful in 4m35s
This commit is contained in:
parent
4a9f517d85
commit
1f940d4a16
@ -1,6 +1,8 @@
|
|||||||
import React, { useMemo } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import { SegmentedControls } from 'components/shared/SegmentedControls';
|
import { SegmentedControls } from 'components/shared/SegmentedControls';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
import { useMediaQuery } from 'usehooks-ts';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
GithubIcon,
|
GithubIcon,
|
||||||
LockIcon,
|
LockIcon,
|
||||||
@ -8,7 +10,7 @@ import {
|
|||||||
TemplateIconType,
|
TemplateIconType,
|
||||||
} from 'components/shared/CustomIcon';
|
} from 'components/shared/CustomIcon';
|
||||||
import { relativeTimeISO } from 'utils/time';
|
import { relativeTimeISO } from 'utils/time';
|
||||||
import { useMediaQuery } from 'usehooks-ts';
|
import templates from 'assets/templates';
|
||||||
|
|
||||||
export const MockConnectGitCard = () => {
|
export const MockConnectGitCard = () => {
|
||||||
const [segmentedControlsValue, setSegmentedControlsValue] =
|
const [segmentedControlsValue, setSegmentedControlsValue] =
|
||||||
@ -46,21 +48,6 @@ export const MockConnectGitCard = () => {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const TEMPLATE_CONTENT = [
|
|
||||||
{
|
|
||||||
name: 'Web app',
|
|
||||||
icon: 'web',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Progressive Web App (PWA)',
|
|
||||||
icon: 'pwa',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Next.js + React + TailwindCSS',
|
|
||||||
icon: 'next-app',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const renderContent = useMemo(() => {
|
const renderContent = useMemo(() => {
|
||||||
if (segmentedControlsValue === 'import') {
|
if (segmentedControlsValue === 'import') {
|
||||||
return (
|
return (
|
||||||
@ -78,7 +65,7 @@ export const MockConnectGitCard = () => {
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div className="grid grid-cols-1 lg:grid-cols-2 relative z-0">
|
<div className="grid grid-cols-1 lg:grid-cols-2 relative z-0">
|
||||||
{TEMPLATE_CONTENT.map((template, index) => (
|
{templates.map((template, index) => (
|
||||||
<MockTemplateCard key={index} {...template} />
|
<MockTemplateCard key={index} {...template} />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user