diff --git a/client/src/services/LinkService/FakeData.ts b/client/src/services/LinkService/FakeData.ts
new file mode 100644
index 0000000..b988782
--- /dev/null
+++ b/client/src/services/LinkService/FakeData.ts
@@ -0,0 +1,372 @@
+import {GetListResponse} from './interfaces/ILinkService.ts';
+import LinkType from '../../models/LinkType.ts';
+
+export const getListFakeData: GetListResponse = {
+ "tags": [
+ {
+ "name": "postgresql",
+ "count": 1
+ },
+ {
+ "name": "rate limiting",
+ "count": 1
+ },
+ {
+ "name": "portfolio",
+ "count": 1
+ },
+ {
+ "name": "book",
+ "count": 1
+ },
+ {
+ "name": "github copilot",
+ "count": 1
+ },
+ {
+ "name": "microfrontends",
+ "count": 1
+ },
+ {
+ "name": "nosql",
+ "count": 1
+ },
+ {
+ "name": "entity framework",
+ "count": 1
+ },
+ {
+ "name": "coding",
+ "count": 1
+ },
+ {
+ "name": "js",
+ "count": 1
+ },
+ {
+ "name": "clean architecture",
+ "count": 4
+ },
+ {
+ "name": "leetcode",
+ "count": 3
+ },
+ {
+ "name": "react",
+ "count": 4
+ },
+ {
+ "name": "architecture",
+ "count": 11
+ },
+ {
+ "name": "ai",
+ "count": 1
+ },
+ {
+ "name": "git",
+ "count": 1
+ },
+ {
+ "name": "interview",
+ "count": 15
+ },
+ {
+ "name": "golang",
+ "count": 1
+ },
+ {
+ "name": "microsoft",
+ "count": 1
+ },
+ {
+ "name": "serverless",
+ "count": 1
+ },
+ {
+ "name": "uncle bob",
+ "count": 1
+ },
+ {
+ "name": ".net",
+ "count": 10
+ },
+ {
+ "name": "auth",
+ "count": 1
+ },
+ {
+ "name": "system design",
+ "count": 8
+ },
+ {
+ "name": "negotiation",
+ "count": 5
+ },
+ {
+ "name": "lambda",
+ "count": 1
+ },
+ {
+ "name": "bun",
+ "count": 1
+ },
+ {
+ "name": "aws",
+ "count": 1
+ },
+ {
+ "name": "graphql",
+ "count": 2
+ },
+ {
+ "name": "microservices",
+ "count": 1
+ },
+ {
+ "name": "typescript",
+ "count": 1
+ },
+ {
+ "name": "ddd",
+ "count": 1
+ },
+ {
+ "name": "martin fowler",
+ "count": 2
+ },
+ {
+ "name": "guide",
+ "count": 2
+ },
+ {
+ "name": "database",
+ "count": 3
+ },
+ {
+ "name": "mongodb",
+ "count": 1
+ }
+ ],
+ "items": [
+ {
+ "id": "youtube-q4AqmZsX8DY",
+ "type": LinkType.Youtube,
+ "title": "Distributed GraphQL APIs: Breaking Down Monoliths & Unlocking Agility for Dev Teams - Michael Staib",
+ "youtube": {
+ "videoId": "q4AqmZsX8DY"
+ },
+ "unknownSource": undefined,
+ "tags": [
+ "architecture",
+ "graphql"
+ ],
+ "likes": 0,
+ "dislikes": 0,
+ "isLiked": false,
+ "isDisliked": false,
+ "isSaved": false,
+ "belongsToUser": false,
+ "user": "Oleksandr Holub",
+ "createdAt": "2024-04-14T14:29:40.300554Z",
+ "editable": false
+ },
+ {
+ "id": "unknownsource--2078006407",
+ "type": LinkType.UnknownSource,
+ "title": "Learn to Build Professional Web Applications with Go",
+ "unknownSource": {
+ "url": "https://lets-go.alexedwards.net/"
+ },
+ "tags": [
+ "golang",
+ "guide"
+ ],
+ "likes": 0,
+ "dislikes": 0,
+ "isLiked": false,
+ "isDisliked": false,
+ "isSaved": false,
+ "belongsToUser": false,
+ "user": "Oleksandr Holub",
+ "createdAt": "2024-04-04T02:25:46.367959Z",
+ "editable": false
+ },
+ {
+ "id": "youtube-ipceTuJlw-M",
+ "type": LinkType.Youtube,
+ "title": "Pipeline-oriented programming - Scott Wlaschin - NDC Porto 2023",
+ "youtube": {
+ "videoId": "ipceTuJlw-M"
+ },
+ "tags": [
+ "architecture",
+ "clean architecture",
+ ".net"
+ ],
+ "likes": 0,
+ "dislikes": 0,
+ "isLiked": false,
+ "isDisliked": false,
+ "isSaved": false,
+ "belongsToUser": false,
+ "user": "Oleksander Holub",
+ "createdAt": "2024-01-19T19:37:05.354551Z",
+ "editable": false
+ },
+ {
+ "id": "youtube-jgQjes7MgTM",
+ "type": LinkType.Youtube,
+ "title": "The BEST Coding Interview Roadmap in 2023 (free)",
+ "youtube": {
+ "videoId": "jgQjes7MgTM"
+ },
+ "tags": [
+ "interview",
+ "leetcode"
+ ],
+ "likes": 0,
+ "dislikes": 0,
+ "isLiked": false,
+ "isDisliked": false,
+ "isSaved": false,
+ "belongsToUser": false,
+ "user": "Oleksander Holub",
+ "createdAt": "2024-01-18T02:59:15.958344Z",
+ "editable": false
+ },
+ {
+ "id": "youtube-MbjObHmDbZo",
+ "type": LinkType.Youtube,
+ "title": "System Design Course for Beginners",
+ "youtube": {
+ "videoId": "MbjObHmDbZo"
+ },
+ "tags": [
+ "interview",
+ "system design"
+ ],
+ "likes": 1,
+ "dislikes": 0,
+ "isLiked": false,
+ "isDisliked": false,
+ "isSaved": false,
+ "belongsToUser": false,
+ "user": "Oleksander Holub",
+ "createdAt": "2024-01-12T00:38:56.658862Z",
+ "editable": false
+ },
+ {
+ "id": "youtube--frNQkRz_IU",
+ "type": LinkType.Youtube,
+ "title": "Capacity Planning and Estimation | System Design for Beginners",
+ "youtube": {
+ "videoId": "-frNQkRz_IU"
+ },
+ "tags": [
+ "interview",
+ "system design"
+ ],
+ "likes": 0,
+ "dislikes": 0,
+ "isLiked": false,
+ "isDisliked": false,
+ "isSaved": false,
+ "belongsToUser": false,
+ "user": "Oleksander Holub",
+ "createdAt": "2024-01-11T17:29:11.637146Z",
+ "editable": false
+ },
+ {
+ "id": "youtube-pomxJOFVcQs",
+ "type": LinkType.Youtube,
+ "title": "Relational Database ACID Transactions (Explained by Example)",
+ "youtube": {
+ "videoId": "pomxJOFVcQs"
+ },
+ "unknownSource": undefined,
+ "tags": [
+ "database"
+ ],
+ "likes": 0,
+ "dislikes": 0,
+ "isLiked": false,
+ "isDisliked": false,
+ "isSaved": false,
+ "belongsToUser": false,
+ "user": "Oleksander Holub",
+ "createdAt": "2024-01-10T15:36:23.845022Z",
+ "editable": false
+ },
+ {
+ "id": "youtube-WZqGS-wczaY",
+ "type": LinkType.Youtube,
+ "title": "Data Consistency | Strong Consistency vs. Eventual Consistency | System Design for Beginners",
+ "youtube": {
+ "videoId": "WZqGS-wczaY"
+ },
+ "unknownSource": undefined,
+ "tags": [
+ "interview",
+ "system design"
+ ],
+ "likes": 0,
+ "dislikes": 0,
+ "isLiked": false,
+ "isDisliked": false,
+ "isSaved": false,
+ "belongsToUser": false,
+ "user": "Oleksander Holub",
+ "createdAt": "2024-01-08T23:46:03.466502Z",
+ "editable": false
+ },
+ {
+ "id": "youtube-UMeKxBcNBE0",
+ "type": LinkType.Youtube,
+ "title": "Await Async Might Change Completely in .NET 9",
+ "youtube": {
+ "videoId": "UMeKxBcNBE0"
+ },
+ "unknownSource": undefined,
+ "tags": [
+ ".net"
+ ],
+ "likes": 0,
+ "dislikes": 0,
+ "isLiked": false,
+ "isDisliked": false,
+ "isSaved": false,
+ "belongsToUser": false,
+ "user": "Oleksander Holub",
+ "createdAt": "2024-01-08T20:21:59.254814Z",
+ "editable": false
+ },
+ {
+ "id": "unknownsource-2031508718",
+ "type": LinkType.UnknownSource,
+ "title": "How I negotiated a $300,000 job offer in Silicon Valley",
+ "youtube": undefined,
+ "unknownSource": {
+ "url": "https://bayareabelletrist.medium.com/how-i-negotiated-a-software-engineer-offer-in-silicon-valley-f11590f5c656"
+ },
+ "tags": [
+ "interview",
+ "negotiation"
+ ],
+ "likes": 0,
+ "dislikes": 0,
+ "isLiked": false,
+ "isDisliked": false,
+ "isSaved": false,
+ "belongsToUser": false,
+ "user": "Oleksander Holub",
+ "createdAt": "2024-01-07T22:53:00.111029Z",
+ "editable": false
+ }
+ ],
+ "pageNumber": 1,
+ "totalPages": 5,
+ "totalCount": 41,
+ "hasPreviousPage": false,
+ "hasNextPage": true
+};
\ No newline at end of file
diff --git a/client/src/services/LinkService/LinkService.ts b/client/src/services/LinkService/LinkService.ts
index ec1c4d2..37ad7f1 100644
--- a/client/src/services/LinkService/LinkService.ts
+++ b/client/src/services/LinkService/LinkService.ts
@@ -10,6 +10,7 @@ import ILinkService, {
} from './interfaces/ILinkService.ts';
import HttpClient from '../HttpClient/HttpClient.ts';
import Link from '../../models/Link.ts';
+import {getListFakeData} from './FakeData.ts';
class LinkService implements ILinkService {
@@ -19,6 +20,10 @@ class LinkService implements ILinkService {
}
async getList(request: GetListRequest): Promise {
+ if (import.meta.env.VITE_MOCK_API === 'true') {
+ return getListFakeData;
+ }
+
const response = await this.httpClient.post(`${this.baseUrl}/getlist`, {...request});
return response.data;