From 1f940d4a16e5bf2da8ab7cea7f6edfb336c5649c Mon Sep 17 00:00:00 2001 From: Nabarun Date: Tue, 12 Nov 2024 19:44:26 +0530 Subject: [PATCH] Fix template tab in github connect UI --- .../projects/create/MockConnectGitCard.tsx | 21 ++++--------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/packages/frontend/src/components/projects/create/MockConnectGitCard.tsx b/packages/frontend/src/components/projects/create/MockConnectGitCard.tsx index 362a52eb..df67468d 100644 --- a/packages/frontend/src/components/projects/create/MockConnectGitCard.tsx +++ b/packages/frontend/src/components/projects/create/MockConnectGitCard.tsx @@ -1,6 +1,8 @@ import React, { useMemo } from 'react'; import { SegmentedControls } from 'components/shared/SegmentedControls'; import { useState } from 'react'; +import { useMediaQuery } from 'usehooks-ts'; + import { GithubIcon, LockIcon, @@ -8,7 +10,7 @@ import { TemplateIconType, } from 'components/shared/CustomIcon'; import { relativeTimeISO } from 'utils/time'; -import { useMediaQuery } from 'usehooks-ts'; +import templates from 'assets/templates'; export const MockConnectGitCard = () => { 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(() => { if (segmentedControlsValue === 'import') { return ( @@ -78,7 +65,7 @@ export const MockConnectGitCard = () => { } return (
- {TEMPLATE_CONTENT.map((template, index) => ( + {templates.map((template, index) => ( ))}
-- 2.45.2