Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor data fetching and filtering logic in get.ts #229

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/Picker/LanguagePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { faChevronDown } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useEffect, useState } from "react";
import { CountableTag } from "../../types";
import { CountableLanguage } from "../../types";
import { SectionTitle } from "../SectionTitle";
import { PickerItem } from "./PickerItem";

type LanguagePickerProps = {
activeTagId: string | string[] | undefined;
languages: CountableTag[];
languages: CountableLanguage[];
onLanguagePage: boolean;
};

Expand Down
4 changes: 2 additions & 2 deletions context/AppDataContext.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { createContext, useState } from "react";

import data from "../data/data.json";
import { AppData, CountableTag, Repository, RepositorySortOrder } from "../types";
import { AppData, CountableTag, CountableLanguage, Repository, RepositorySortOrder } from "../types";

const DEFAULT_VALUE: AppData = {
languages: [],
Expand All @@ -22,7 +22,7 @@ const AppDataProvider = ({ children }: { children: React.ReactNode }) => {
tags
}: {
repositories: Repository[];
languages: CountableTag[];
languages: CountableLanguage[];
tags: CountableTag[];
} = data;
const [repositories, setRepositories] = useState<Repository[]>(allRepositories);
Expand Down
Loading