Skip to content

Commit

Permalink
update: footer
Browse files Browse the repository at this point in the history
  • Loading branch information
DangTinh422003 committed Nov 14, 2024
1 parent 7016cff commit b256b06
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 8 deletions.
36 changes: 36 additions & 0 deletions src/app/projects/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { Loader } from 'lucide-react'
import { useEffect, useState } from 'react'

import { type Project } from '@/components/Projects'
import { supabase } from '@/lib/supabase/client'

interface ProjectDetailProps {
params: { id: string }
}

const ProjectDetail = ({ params: { id } }: ProjectDetailProps) => {
const [project, setMember] = useState<Project | null>(null)
const [isLoading, setIsLoading] = useState(false)

useEffect(() => {
;(async () => {
setIsLoading(true)
const { data } = await supabase
.from('projects')
.select('*')
.eq('id', id)
.single()
if (data) setMember(data as Project)

setIsLoading(false)
})()
}, [])

return isLoading ?
<div className="flex h-screen w-screen items-center justify-center">
<Loader className="animate-spin" size={30} />
</div>
: <></>
}

export default ProjectDetail
11 changes: 3 additions & 8 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,17 @@ const socialLinks = [
{
name: 'Twitter',
icon: <FaTwitter className="size-5" />,
href: 'https://twitter.com',
href: 'https://x.com/WeminalHack',
},
{
name: 'Github',
icon: <FaGithub className="size-5" />,
href: 'https://github.com',
},
{
name: 'LinkedIn',
icon: <FaLinkedin className="size-5" />,
href: 'https://linkedin.com',
href: 'https://github.com/Weminal-labs',
},
{
name: 'Facebook',
icon: <FaFacebook className="size-5" />,
href: 'https://facebook.com',
href: 'https://www.facebook.com/groups/weminalhack',
},
]

Expand Down

0 comments on commit b256b06

Please sign in to comment.