mirror of
https://github.com/revanced/revanced-website.git
synced 2025-06-12 21:27:42 +02:00
feat: hydration
This commit is contained in:
@ -1,7 +1,8 @@
|
||||
<script lang="ts">
|
||||
import type { Contributor } from '$lib/types';
|
||||
import ContributorButton from '../atoms/ContributorPerson.svelte';
|
||||
|
||||
export let contribs;
|
||||
export let contribs: Contributor[];
|
||||
export let repo: string;
|
||||
|
||||
let repo_name = repo
|
||||
|
@ -1,10 +0,0 @@
|
||||
import { readable } from "svelte/store";
|
||||
|
||||
const fetchContributors = async () => {
|
||||
const response = await fetch('https://releases.rvcd.win/contributors');
|
||||
const json = await response.json();
|
||||
return json;
|
||||
};
|
||||
|
||||
const ContributorsStore = readable(fetchContributors());
|
||||
export default ContributorsStore;
|
@ -1,11 +0,0 @@
|
||||
import { readable } from "svelte/store";
|
||||
|
||||
const fetchPatches = async () => {
|
||||
const response = await fetch('https://releases.rvcd.win/patches');
|
||||
const json = await response.json();
|
||||
console.log(typeof json)
|
||||
return json;
|
||||
};
|
||||
|
||||
const PatchesStore = readable(fetchPatches());
|
||||
export default PatchesStore;
|
34
src/lib/types.ts
Normal file
34
src/lib/types.ts
Normal file
@ -0,0 +1,34 @@
|
||||
export interface Contributor {
|
||||
login: string;
|
||||
avatar_url: string;
|
||||
html_url: string;
|
||||
}
|
||||
|
||||
export interface Repository {
|
||||
name: string;
|
||||
contributors: Contributor[];
|
||||
}
|
||||
|
||||
export interface Patch {
|
||||
name: string;
|
||||
description: string;
|
||||
version: string;
|
||||
excluded: boolean;
|
||||
deprecated: boolean;
|
||||
dependencies: string[];
|
||||
options: PatchOption[];
|
||||
compatiblePackages: CompatiblePackage[];
|
||||
}
|
||||
|
||||
export interface CompatiblePackage {
|
||||
name: string;
|
||||
versions: string[];
|
||||
}
|
||||
|
||||
export interface PatchOption {
|
||||
key: string;
|
||||
title: string;
|
||||
description: string;
|
||||
required: boolean;
|
||||
choices: string[];
|
||||
}
|
Reference in New Issue
Block a user