Skip to content

Commit

Permalink
install lucide-react
Browse files Browse the repository at this point in the history
  • Loading branch information
emiljohansson committed Feb 10, 2024
1 parent a52501a commit 36918c5
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 23 deletions.
1 change: 1 addition & 0 deletions apps/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"jsonwebtoken": "9.0.2",
"just-range": "4.1.1",
"lib": "workspace:*",
"lucide-react": "0.323.0",
"nanostores": "0.9.5",
"next": "14.0.4",
"react": "18.2.0",
Expand Down
14 changes: 7 additions & 7 deletions apps/next/src/app/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import type { Tables } from '@/lib/database.types'
import Link from 'next/link'
import { AccessibleIcon } from '@radix-ui/react-accessible-icon'
import { FiCommand, FiExternalLink } from 'react-icons/fi'
import { GrGithub } from 'react-icons/gr'
import { Command, ArrowUpRightFromSquare } from 'lucide-react'
import { openCommandMenu } from './CommandMenu'

export function Content({ projects }: { projects: Tables<'project'>[] }) {
Expand Down Expand Up @@ -41,11 +41,11 @@ export function Content({ projects }: { projects: Tables<'project'>[] }) {
rounded
"
>
<FiCommand /> K
<Command size={12} /> K
</span>
</button>
</div>
<div className="h-screen p-3 m-0 max-w-md mx-auto">
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 h-screen p-3 m-0 max-w-7xl mx-auto">
{projects.map(({ title, href, description, test }, index) => {
const external = href.startsWith('http')

Expand All @@ -54,7 +54,8 @@ export function Content({ projects }: { projects: Tables<'project'>[] }) {
key={index}
href={href}
className="
flex flex-col rounded-md p-4 m-3 relative
rounded-md p-4 m-3 relative
min-h-[100px]
bg-white dark:bg-black
ease-in-out duration-100
shadow-sm
Expand All @@ -67,9 +68,8 @@ export function Content({ projects }: { projects: Tables<'project'>[] }) {
<span className="flex items-center mb-1">
{title}{' '}
{external && (
<FiExternalLink
width={18}
height={18}
<ArrowUpRightFromSquare
size={18}
className="absolute right-3"
/>
)}
Expand Down
4 changes: 2 additions & 2 deletions apps/next/src/app/jwt-generator/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use client'

import Content from '@/components/Content'
import Section from '@/components/Section'
import { useState } from 'react'
import { sign } from 'jsonwebtoken'
import Content from '@/components/Content'
import Section from '@/components/Section'

export default function Page() {
const [encodedValue, setEncodedValue] = useState('')
Expand Down
2 changes: 1 addition & 1 deletion apps/next/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { PropsWithChildren } from 'react'
import type { Metadata } from 'next'

// import 'ui/globals.css'
import './styles.css'
import 'ui/globals.css'

import { headers } from 'next/headers'
import Link from 'next/link'
Expand Down
8 changes: 4 additions & 4 deletions apps/next/src/app/random-string/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import type { Ref } from '@/components/RandomString'

import { useRef, useState } from 'react'
import { FiCheck, FiCopy, FiRefreshCw } from 'react-icons/fi'
import { RefreshCw, Check, Copy } from 'lucide-react'
import RandomString from '@/components/RandomString'
import { copyToClipboard } from 'lib/utils/string'

Expand All @@ -19,7 +19,7 @@ export default function Content({ initialValue }: { initialValue: string }) {
onClick={() => randomStringRef.current?.generateNewValue()}
data-test="refresh"
>
<FiRefreshCw width={16} height={16} />
<RefreshCw width={16} height={16} />
<span>Refresh</span>
</button>
<button
Expand All @@ -32,9 +32,9 @@ export default function Content({ initialValue }: { initialValue: string }) {
data-test="copy"
>
{copied ? (
<FiCheck width={16} height={16} />
<Check width={16} height={16} />
) : (
<FiCopy width={16} height={16} />
<Copy width={16} height={16} />
)}
<span>Copy</span>
</button>
Expand Down
2 changes: 0 additions & 2 deletions apps/next/src/app/state-management/SvelteStoreExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ function derived<S, T>(
const values: S[] = []
const unsubscribers = storesArray.map((store, index) => {
return store.subscribe((value) => {
console.log('derived.subscribe', value, values)

values[index] = value
set(fn(single ? values[0] : values))
})
Expand Down
8 changes: 4 additions & 4 deletions apps/next/src/app/two-way-auth/enter/TwoWayAuthEnter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { useState, useRef, FormEvent, ChangeEvent } from 'react'
import { Label } from '@radix-ui/react-label'
import { FiCheck, FiMoreHorizontal, FiX } from 'react-icons/fi'
import { Check, X, MoreHorizontal } from 'lucide-react'

enum State {
idle,
Expand All @@ -28,21 +28,21 @@ function EnteredContent({ state }: { state: State }) {
return (
<>
<span className="sr-only">loading</span>
<FiMoreHorizontal />
<MoreHorizontal />
</>
)
case State.valid:
return (
<>
<span className="sr-only">valid</span>
<FiCheck />
<Check size={16} />
</>
)
case State.invalid:
return (
<>
<span className="sr-only">invalid</span>
<FiX />
<X />
</>
)
}
Expand Down
17 changes: 14 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 36918c5

Please sign in to comment.