Skip to content

Conversation

@grmbyrn
Copy link
Collaborator

@grmbyrn grmbyrn commented Nov 25, 2024

  • routes/contributor/+layout.server.ts wasn't accessing data from routes/api which had been set up to facilitate the change from routes/(blog) to routes/blog. This was causing the contributor's articles not to be shown on their page as detailed here. I made this data accesible to routes/contributor by adding the code below to routes/contributor/+layout.server.ts
export const load = async ({ fetch }) => {
	const response = await fetch(`/api`);
	const posts = await response.json();

	return {
		posts
	};
};

@grmbyrn grmbyrn requested a review from josecelano November 25, 2024 18:36
@josecelano josecelano linked an issue Nov 25, 2024 that may be closed by this pull request
@josecelano
Copy link
Member

ACK d4458bd

@josecelano josecelano merged commit 6c78abc into torrust:develop Nov 25, 2024
1 check passed
@grmbyrn grmbyrn deleted the fix-contributors branch November 28, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add contributor's articles to contributor's profile

2 participants