mirror of
https://github.com/linkwarden/linkwarden.git
synced 2026-03-03 03:47:02 +00:00
40 lines
906 B
TypeScript
40 lines
906 B
TypeScript
import { useLinks } from "@linkwarden/router/links";
|
|
import { View, StyleSheet, Platform } from "react-native";
|
|
import useAuthStore from "@/store/auth";
|
|
import { useLocalSearchParams } from "expo-router";
|
|
import React from "react";
|
|
import Links from "@/components/Links";
|
|
|
|
export default function LinksScreen() {
|
|
const { auth } = useAuthStore();
|
|
const { search } = useLocalSearchParams<{ search?: string }>();
|
|
|
|
const { links, data } = useLinks(
|
|
{
|
|
sort: 0,
|
|
searchQueryString: decodeURIComponent(search ?? ""),
|
|
},
|
|
auth
|
|
);
|
|
|
|
return (
|
|
<View
|
|
style={styles.container}
|
|
className="h-full bg-base-100"
|
|
collapsable={false}
|
|
collapsableChildren={false}
|
|
>
|
|
<Links links={links} data={data} />
|
|
</View>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
container: Platform.select({
|
|
ios: {
|
|
paddingBottom: 83,
|
|
},
|
|
default: {},
|
|
}),
|
|
});
|