Skip to content

Commit

Permalink
upsate
Browse files Browse the repository at this point in the history
  • Loading branch information
pernielsentikaer authored Apr 22, 2024
1 parent 8921039 commit a2089af
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion extensions/anybox/src/components/FolderItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface Props {

export default function FolderItem(props: Props) {
const folder = props.item;
const preferences = getPreferenceValues();
const preferences = getPreferenceValues<Preferences.Search>();
if (preferences.asIcons) {
return (
<Grid.Item
Expand Down
2 changes: 1 addition & 1 deletion extensions/anybox/src/components/LinkItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import calendar from "dayjs/plugin/calendar";
import "dayjs/locale/en";
import { Link } from "../utilities/searchRequest";

const preferences = getPreferenceValues();
const preferences = getPreferenceValues<Preferences.Search>();

dayjs.locale("en");
dayjs.extend(calendar);
Expand Down
2 changes: 1 addition & 1 deletion extensions/anybox/src/components/TagItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface Props {

export default function TagItem(props: Props) {
const tag = props.item;
const preferences = getPreferenceValues();
const preferences = getPreferenceValues<Preferences.Search>();
if (preferences.asIcons) {
return (
<Grid.Item
Expand Down
6 changes: 1 addition & 5 deletions extensions/anybox/src/saveNote.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,14 @@ interface FolderProp {
name: string;
}

interface Preferences {
autoFill: boolean;
}

interface SaveNoteResponse {
code: number;
message: string;
url: string;
}

function NoteForm() {
const preferences = getPreferenceValues<Preferences>();
const preferences = getPreferenceValues<Preferences.SaveNote>();
const [note, setNote] = useState<string>();
const [comment, setComment] = useState<string>();
const [tags, setTags] = useState<TagProp[]>([]);
Expand Down
2 changes: 1 addition & 1 deletion extensions/anybox/src/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default function SearchResult() {
isSearchEngines: false,
});
const [searchText, setSearchText] = useState("");
const preferences = getPreferenceValues();
const preferences = getPreferenceValues<Preferences.Search>();

useEffect(() => {
const searchLinks = async () => {
Expand Down
2 changes: 1 addition & 1 deletion extensions/anybox/src/searchFolder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function SearchFolder(props: Props) {
});
const folder = props.folder;
const [searchText, setSearchText] = useState("");
const preferences = getPreferenceValues();
const preferences = getPreferenceValues<Preferences.Search>();

useEffect(() => {
const searchLinks = async () => {
Expand Down
2 changes: 1 addition & 1 deletion extensions/anybox/src/searchTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function SearchTag(props: Props) {
});
const tag = props.tag;
const [searchText, setSearchText] = useState("");
const preferences = getPreferenceValues();
const preferences = getPreferenceValues<Preferences.Search>();

useEffect(() => {
const searchLinks = async () => {
Expand Down
2 changes: 1 addition & 1 deletion extensions/anybox/src/utilities/searchRequest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export interface Link {
}

export default async function searchRequest(query: SearchQuery): Promise<[Link]> {
const preferences = getPreferenceValues();
const preferences = getPreferenceValues<Preferences.Search>();
// @ts-expect-error: Don’t know how to satify URLSearchParams’s type.
const searchParams = new URLSearchParams(query);
return fetch("http://127.0.0.1:6391/search?" + searchParams, {
Expand Down
2 changes: 1 addition & 1 deletion extensions/anybox/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node 16",
"include": ["src/**/*"],
"include": ["src/**/*", "raycast-env.d.ts"],
"compilerOptions": {
"lib": ["es2021"],
"module": "commonjs",
Expand Down

0 comments on commit a2089af

Please sign in to comment.