use native tail and remove lodash
This commit is contained in:
1 parent
1c0a28b25f
commit
727c0592ce
3 files changed
+7
-3
No files matched your search
@@ -23,7 +23,6 @@
|
||||
"@radix-ui/react-tooltip": "^1.0.0",
|
||||
"classnames": "^2.2.6",
|
||||
"date-fns": "^2.29.0",
|
||||
"lodash": "^4.17.21",
|
||||
"markdown-it": "^13.0.1",
|
||||
"next": "^13.1.0",
|
||||
"next-seo": "^5.15.0",
|
||||
@@ -38,7 +37,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/classnames": "^2.2.10",
|
||||
"@types/lodash": "^4.14.149",
|
||||
"@types/markdown-it": "^12.2.3",
|
||||
"@types/node": "^18.13.0",
|
||||
"@types/react": "^18.0.18",
|
||||
|
||||
+1
-1
@@ -1,6 +1,5 @@
|
||||
import Head from "next/head"
|
||||
import { App } from "src/components/App"
|
||||
import { tail } from "lodash"
|
||||
import { Page } from "src/components/Page"
|
||||
import { NextSeo } from "next-seo"
|
||||
import { MetaBuilder } from "src/lib/meta"
|
||||
@@ -15,6 +14,7 @@ import { PageGrid } from "@/components/PageGrid"
|
||||
import { useRouter } from "next/router"
|
||||
import { FileCard } from "@/components/FIleCard"
|
||||
import { Picture } from "@/ui/Picture"
|
||||
import { tail } from "@/lib/array"
|
||||
|
||||
async function getUrls() {
|
||||
let urls: string[] = []
|
||||
|
||||
@@ -11,3 +11,9 @@ export function insertBetween<T, I = T>(items: T[], fn: InsertBetweenFunction<I>
|
||||
return acc
|
||||
}, [])
|
||||
}
|
||||
|
||||
export function tail<T>(items: T[]): T[] {
|
||||
const [_, ...rest] = items
|
||||
return rest
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user